package facede

import (
	"context"
	"ginfwk/infrastructure/component/queue"
	di "github.com/samber/do"
)

func CtxQueue(ctx context.Context) queue.Queue {
	ctxLogger := CtxLogger(ctx)

	currentQueue, err := di.Invoke[queue.Queue](nil)
	if err != nil {
		panic(err)
	}
	return currentQueue.CtxQueue(ctx, ctxLogger)
}
